﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace VIA.Integration
{
    public enum AxisRunningMode
    {
        [Description("空闲模式")]
        Idle = 0,
        [Description("定长模式")]
        ConstantLength,
        [Description("定速模式")]
        ConstantSpeed,
        [Description("回原模式")]
        Home,
        [Description("手轮模式")]
        HandWheel,
        PT,
        PVT,
        [Description("电子齿轮模式")]
        ElectronicGear,
        [Description("电子凸轮模式")]
        ElectronicCam,
        [Description("单段直线模式")]
        SingleLinear,
        [Description("连续插补模式")]
        ContinuousInterpolation,
        [Description("停止模式")]
        Stop,
        [Description("限位模式")]
        Limit,
        [Description("驱动器PP模式")]
        PP,
        [Description("龙门模式")]
        Gantry,
        [Description("退出龙门模式")]
        ExitGantry,
        [Description("门型运动")]
        GantryMotion,
        [Description("插补速度跟随模式")]
        InterpolationSpeedFollow,
        [Description("正弦振荡曲线模式")]
        SineOscillationCurve,
        [Description("插补速度跟随模式")]
        InterpolationSpeedFollow2,
        [Description("转矩控制模式")]
        TorqueControl,
        [Description("PDO缓存运动模式")]
        PDO,
        [Description("驱动器PV模式")]
        DriverPV,
        [Description("插补暂停定长运动模式")]
        InterpolationPauseConstantLengthMotion
    }
    /// <summary>
    ///    
    /// </summary>
    public class AxisOption
    {
        /// <summary>
        /// 轴号
        /// </summary>
        public int NoId { get; set; }

        /// <summary>
        /// 当量脉冲。
        /// </summary>
        public double Equivalent { get; set; }

        /// <summary>
        /// 默认运行速度
        /// </summary>
        //public double? Maxvel { get; set; }
        public VelocityCurve VelocityCurve { get; set; }
        /// <summary>
        ///回零速度
        /// </summary>
        public VelocityCurve HomeVelocityCurve { get; set; }
        /// <summary>
        /// 回零偏移
        /// </summary>
        public double HomeOffset { get; set; }
        /// <summary>
        /// 运动路径
        /// </summary>
        public List<MotionPathOption> MotionPaths { get; set; }


    }
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
    public class MotionPathAttribute : Attribute
    {
        public string Name { get; }
        public MotionPathAttribute(string name)
        {
            Name = name;
        }
    }
}
